/,-^%\ (P 4 .^fe.% J>*.<tifc\ 















■^ 






^5°^ 







•?*X' ,.♦ 



o*' -\--r.r-- ^ '^•^P'o*' v : ---> "V^^*** v-tt- 



J* . 



J* •' 



V %*^V V^V %^V V^*V V 



W 



<W> 









^' A° ^ 



> "V 



*^ ** 




\ '-IK?-* «^ 






1~ .1 






«f» ' 



<> *'TVT« ,0 X 



t* « 



• » * .A 



<* *'TVT* ,G* 







"oV" 



^V. V 



t* A v *^«. 



xs 






^Qt 






<U *'TV.* ,0 









„«• 













A<^ 
















.0° V*^-'^ 









V ^ -i^-°- /-^i% ^.i^-% 













»H<^ 





•>o* 












r> 



to 



aT o • - _ . » O"^ 



^r %. • • ° a V. " ' <V 






H°* 



IC 


8939 



Bureau of Mines Information Circular/1983 



Passive Encoder for Range Knobs 



By William H. Schiffbauer 




UNITED STATES DEPARTMENT OF THE INTERIOR 



Information Circular 8939 



Passive Encoder for Range Knobs 



By William H. Schiffbauer 




UNITED STATES DEPARTMENT OF THE INTERIOR 

James G. Watt, Secretary 

BUREAU OF MINES 
Robert C. Horton, Director 




(It) 



,%rt 







This publication has been cataloged as follows: 



Schiffbauer, William H 

Passive encoder for range knobs. 

(Information circular ; 8939) 

Supt. of Docs, no.: I 28.27:8939. 

1. Computer interfaces. I. Title. II. Title: Range knobs. III. 
Series: Information circular (United States. Bureau of Mines) ; 8939. 



TN295.U4 [TK7887.5] 622s [621. 3819'5832] 83-600134 



CONTENTS 

Page 

Abstract 1 

Introduction 1 

Background ' 2 

Description 3 

Application 4 

Operation 4 

Limitations 4 

Conclusions 4 

ILLUSTRATIONS 

1. Passive encoder for range knobs (PERK) 2 

2 . PERK electrical schematic 3 

3. Instrument with the label 5 

4 . Applying the PERK 5 

5. Instrument with the PERK 6 

6. Instrument with the custom knob 6 

7. Suggested spacer 7 

8. Completed installation 7 



PASSIVE ENCODER FOR RANGE KNOBS 

By William H. Schiffbauer 1 



ABSTRACT 

The Bureau of Mines has developed a passive encoder for range knobs, 
a device that automates the task, of obtaining the range settings from 
devices or instruments to be input to microcomputers. It is easily 
constructed and installed and will not disrupt the device to which it 
is being attached. It consists of a custom knob and a small printed 
circuit board that has light-emitting diodes and magnetic reed switches 
attached. A ribbon cable connects it to a microcomputer. This encoder 
eliminates one source of human error in an automated process. 

INTRODUCTION 

The microcomputer development laboratory of the Bureau of Mines ap- 
plies technology to experimental research. Its objectives are to auto- 
mate repetitious tasks, increase accuracy, and save time in doing 
research. This work sometimes involves connecting the outputs of in- 
struments to microcomputers. Some instruments do not provide enough 
outputs for the microcomputer to process its data. A search was con- 
ducted for a commercially available product to accomplish this task, 
but a suitable device could not be found. The Bureau then developed a 
device called a passive encoder for range knobs (PERK) (fig. 1), which 
provided a microcomputer-compatible output. It was easy to install, 
and the cost was very low. One data-logging project alone used six 
PERK's; their performance was outstanding. 

This report provides complete details of this device. 
Electronics technician, Pittsburgh Research Center, Bureau of Mines, Pittsburgh, PA. 



BACKGROUND 



The Bureau developed the PERK to moni- 
tor the output of gas analyzers in a 
microcomputer-controlled experiment. The 
PERK was needed to fill a gap the gas- 
analyzing instruments did not provide in 
the form of an output. Some gas analyz- 
ers have only one analog output for eight 
ranges of gas concentrations. The fol- 
lowing tabulation is an example of the 
ranges and the outputs provided on one 
nitrogen oxide (N0 X ) analyzer: 



Range 


Gas 




Output, 


position 


cone 
ppn 


• > 

L 


Vdc 


1 


0- 


5 


0-5 


2 


0- 


10 


0-5 


3 


0- 


20 


0-5 


4 


0- 


50 


0-5 


5 


0- 


100 


0-5 


6 


0- 


200 


0-5 


7 


0- 


500 


0-5 


8 


0-1, 


000 


0-5 



Note that both the range and the output 
voltage must be considered to know the 
correct gas concentration. For example, 
80 ppm on range 5 gives the same output 
voltage as 160 ppm on range 6. 



,€?> 




Scale, in 



The instrument supplies only the out- 
put voltage. Nothing is done to provide 
an output for the range position. There- 
fore, some method must be used to ob- 
tain an output so the microcomputer will 
know the correct gas concentration. This 
range position information can be ob- 
tained in one of two ways: 

1. Manually enter the range informa- 
tion into the microcomputer keyboard at 
the appropriate time. 

2. Automatically monitor the range 
position by some mechanical or electrical 
connection to the instrument. 



The manual 
limitations: 



operation has several 



1 . At the beginning of the process , 
the operator must enter the correct range 
into the microcomputer. 

2. The operator must remember that 
changes to the instrument's range can 
only be made when the microcomputer is 
stopped. 

3. The collected data would be inac- 
curate as the instrument's output voltage 
approached or 5 Vdc because the instru- 
ment should be on the next lower or upper 
range position. This is because most in- 
struments have their greatest accuracy 
when reading between 80% and 100% of full 
scale. 

4. Valuable information could be lost 
during range changing because the micro- 
computer would be stopped. 



These limitations left too 
bilities for human error, so 
tic approach was pursued. 



many possi- 
the automa- 



FIGURE 1, - Passive encoder for range knobs (PtRK). 



The first approach to automatically en- 
code the range switch position was to try 
to attach another section or wafer to the 
switch. A few instruments were opened to 
see if this was possible, but they were 
packed tight with electrical and mechani- 
cal hardware. Adding anything to them 



would require major modifications. To 
avoid this problem, a more passive ap- 
proach was pursued. It used the front 
panel of the instrument and the range 
switch knob. 

Three methods were studied using 
mechanical, magnetic, and optical 



components. The mechanical and optical 
components, however, were too bulky and 
interfered with the function of other 
knobs on the instruments. The components 
selected for magnetic coupling were very 
compact. These components fit on all the 
instruments and were able to encode the 
instrument's range position. 



DESCRIPTION 



Miniature magnetic reed switches and a 
small magnet were selected to do the 
range switch position encoding. When a 
magnet passes over a switch, it closes. 
Using this principle and these de- 
vices, several test encoders were con- 
structed. The result is the PERK shown 
in figure 1. 

Magnetic reed switches are small glass 
capsules that are 1/2 in long and 1/8 in 
in diameter. Each capsule houses two 
metal contacts that come together in the 
presence of a magnetic field. The mag- 
netic reed switches were placed on a 
printed circuit board at 30° increments, 
to coincide with each range position. 
The circuit board is 1/16 in thick and 
shaped like a common protractor. It is 
placed under the instrument's knob and 
provides an individual output through an 
edge connector for each of the magnetic 
switches. Also, each switch had an asso- 
ciated light-emitting diode (LED) at- 
tached to it that lighted when the switch 
closed. LED's are 1/8-in-diameter elec- 
tronic devices that emit light when a 
voltage is applied. The magnet used was 
inserted into a small hole that was 
drilled into the instrument's knob. When 
the knob is turned and the magnet passes 
over one magnetic switch, that switch 
closes, an LED lights, and an output is 
produced for one specific range position 
of the instrument. 

Figure 2 shows the design of the cir- 
cuit board with the components mounted. 
The magnetic reed switches are SI to S9 , 
and the LED's are Dl to D9. A card edge 
connector (PI) is used for ease of appli- 
cation and removal of the PERK. It also 
provides 5 Vdc to light the LED's and 



/| 6 -in- thick printed circuit 
board mounted with compon- 
ents is encapsulated in ^/g- 
in-thick clear plastic 



KEY 
D3-Diode 
S4-Switch 




Card edge^ i zj«567s9ioii 
connector 

PI 



Rl-2700. 

Pins on 05-in 
centers 



PASSIVE INSTRUMENTATION RANGE DECODER 



1234567691011 



Card edge 
moting connector' 
Jl 



Magnet is inserted in hole 
'/ 32 in from base '/£ in deep? 




Card e 


iqe Dip 


pin 


pin 

15 

2 


2 


3 


14 


4 


3 


5 


13 


6 


4 


7 


12 


8 


5 


9 


II 


10 


6 


II 


10 


,D 


p connector 


^\ 


P2 



II 1 1 1 1 1 



MODIFIED KNOB 



RIBBON CABLE 




Ground 



INTERFACE BOARD 

FIGURE 2. - PERK electrical schematic. 



supplies the encoded output for each 
range position. Rl is a current-limiting 
resistor for the LED's. The circuit 
board, with all the components mounted, 
is then encapsulated with clear plastic 
for protection. A piece of double-sided 
tape is applied to the back of the PERK 
so it can be attached to the instrument. 

A ribbon cable with a card edge con- 
nector (Jl) on one end and a DIP con- 
nector (P2) on the other end connects the 



PERK to an interface board (PC2). The 
interface board connects to DIP connector 
P2 via DIP connector J2. The 5-Vdc sup- 
ply is attached to the board on termi- 
nal strip TB2. R2 on PC2 is a current- 
limiting resistor. The 5-Vdc power is 
applied to the PERK through pin 4 of J2; 
-5 Vdc is on pin 10. The encoded outputs 
from the PERK come through J2 and go to 
terminal strip TBI , where they are avail- 
able as a 5-Vdc logic signal for applica- 
tion to any other device. 



APPLICATION 



The first step is to copy the range in- 
formation of the instrument onto a label, 
as shown in figure 3. Then, remove the 
knob and prepare the PERK by removing the 
tape on its back to expose the sticky 
surface (fig. 4). Next, stick the PERK 
on the instrument. Figure 5 shows the 
PERK when properly attached. The cus- 
tomized knob is inserted onto the switch 
shaft as shown in figure 6. Some 



applications may require the addition of 
spacers under the PERK to insure proper 
spacing in relation to the knob. An ex- 
ample of a suggested spacer is shown in 
figure 7. When the PERK is properly 
applied, attach the interface cable as 
indicated in figure 8 to both the PERK 
and the interface board. The unit is now 
ready to connect to a computer. 



OPERATION 



Refer to figures 2 and 8. When power 
is applied and the knob is in position 1, 
the magnet in the knob causes SI to 
close. This applies power to the LED 
(Dl), causing it to light. It also sup- 
plies 5 Vdc to pin 1 of card edge 
connector PI, which is connected to posi- 
tion 1 on terminal strip TBI of the 



interface board. When the knob is turned 
to position 2, 3, etc., the same thing 
happens, but each position activates a 
different set of parts and, in effect, 
gives a unique 5-Vdc output for each knob 
position. These outputs are provided on 
TBI of the interface board and can be ap- 
plied to a computer. 



LIMITATIONS 



This device was designed for instrument 
switches that have 30° increments between 
positions, but other instrument switches 
can have increments of either 15° or 45°. 



This method will not permit decoding of 
15° switches; however, the 45° switches 
can be monitored by the PERK printed cir- 
cuit board. 



CONCLUSIONS 



The PERK is a device that performs a 
critical task in an automated process. 
It can be constructed by most electronic 
laboratories with a few common and inex- 
pensive electronic components. Although 
this report discusses the use of the PERK 
only on instrumentation and computerized 
processes , it may be used in any number 



of applications that require monitoring 
of a knob's position. 

Installation of the PERK under normal 
circumstances takes less than 15 min. 
After installation, the system operator 
can forget about the instrument's range 
position. The computer monitors the 




FIGURE 3- - Instrument with the label. 




FIGURE 4. • Applying the PERK. 









FIGURE 5. - Instrument with the PERK. 




FIGURE 6. = Instrument with the custom knob. 




FIGURE 7. - Suggested spacer. 




Am - 

FIGURE 3. Completed installation. 



KtAtriOM 



range position continuously and uses that The PERK's simple construction, ease of 

information to calculate the instrument's installation, and savings in material and 

output. labor time makes it a significant devel- 
opment. Operators of automated instru- 

The Bureau has estimated that on one mentation processes should find the PERK 

project the PERK's use saved 8 days of to be a valuable asset, 
labor. 



INT.-BU.OF MINES, PGH., PA. 26936 







r ^9 





***** .'Jfef- ^ / ^ 




^6* 




"oV" 



** °** "W&' *° ** 







,* v >: 






4 4? % ' 






*.">. V 








c,^ 




* *0 j> «. ° " • 





■» o 



o V 











-a5 ^ 








w * 










4> o°r e « ^ 












' ^ 















* "^ 







, .** /^tei'- ** .=.** .^vx-. ** A * /date**- **. ^* .>v/k-_ *,. A * .*«oK'. 




/ ..; 






*v 



v^ 1 







* o 





■ ° AT ^ 






**# 




"\^<-V ^,C^> ,<^i.\ /.C^^o 




^**til*S 'JP'jiMkS' \^i^>o ' ' V^.-^i-X 



<0 «£> *.,,• a-V- 







? 




r oy 







f a <^ '?.?« .0* V ♦7KT» a <r 



.„»- .g* V *T*Xv a 

• j j5^s.^*^ o 










o_ * 



■. ^ 




a g* v *>???• a 



** a* ^Va* \ # 

* -V v« °^ 














" A V *V 







"oV 






v-o^ 










J 3 ~* 







; 'w •■ 



^^ 



c* * 










' ^ A^ • 






-ov y :£§i^ ^o^ :*^IB: -ov* :]iflf^* ^o* •- 




»?v 





^ "^ -J 



A*> »wiw'* > 







H o 

- % ** -i<^; o o ^ > •*)£&• ^ a* •• 







:- ^n< •« 



*bt? 






v- 



I 



40 .^ypsf <o «». 








^0< 



















"oV 



UBRA^ 0FC ' 



NGRE sS 







jii^Sa 



1 



